package com.kafka.controller;

import com.kafka.service.KafkaTest;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/kafka")
@RequiredArgsConstructor
public class KafkaController {
    private final KafkaTest kafkaTest;

    @GetMapping("/sendMsg")
    public Boolean sendMsg(@RequestParam String msg){
        kafkaTest.sendMsg(msg);
        return true;
    }
}
